home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Tele / C / Calypso Folder / Connection Files / Generic Serial Tool Modem < prev    next >
Encoding:
Text File  |  1992-08-21  |  11.2 KB  |  444 lines  |  [TEXT/GEOL]

  1. ! Generic Serial Tool Modem CCL
  2. ! This script has been modified from the Serial Tool Modem CCL for AppleLink and 
  3. ! may still contain references to AppleLink.
  4. ! You can use this script to establish a connection over a hayes compatible modem
  5. ! to any kind  of system. It does not make any attempt to send user information 
  6. ! (username, password, etc), but this can be added by modifying the section of 
  7. !  code before the exit. 
  8. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  9. !•••                        This is the disconnection code.                 •••
  10. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  11. !
  12. *-LABEL 0
  13. *SetVar 1 0
  14. *MatchStr 1 4 NO CARRIER
  15. *MatchStr 2 1 OFF
  16. *MatchStr 3 1 CRU
  17. *Wait 800
  18. !
  19. *-LABEL 1
  20. *Wait 120  --the modem should hang up automatically
  21. *MatchStr 2 4 OK
  22. !
  23. *-LABEL 2
  24. *ChrDelay 10
  25. *Xmit +++
  26. *Pause 80
  27. *Xmit ATZ\13
  28. *Wait 300
  29. *IncVar 1
  30. *IfVar 1 5 3
  31. *Jump 2
  32. !
  33. *-LABEL 3
  34. *Alert 3 Your modem is not hanging up properly. Please turn it off and then back on again before reconnecting to AppleLink.
  35. !
  36. *-LABEL 4
  37. *CTBClose
  38. *Exit 0
  39. !
  40. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  41. !•••  This is the connection code. LABEL 0 configures AppleLink for         •••
  42. !•••  communication. LABELs 1-25 are modem configuration and dialing.       •••
  43. !•••  LABELs 30 through 38 are host connection. Do not change LABELs 30-38. •••
  44. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  45. !
  46. -LABEL 0
  47. CanBtn 91
  48. IfEqJMP "" "~FONE" 53
  49. NoCTB 54
  50. DsplyPic 1
  51. DsplyMsg Establishing communication with the serial device.
  52. !
  53. !••••••••The following is where the CCL sets up and calls the CTB Tool•••••••••
  54. !
  55. !  -Call the tool selected in the setup connection dialog
  56. CTBTool 56 55 0 ~TOOL  
  57. !
  58. !  -Set the Tool parameters. If param value contains a space, set value off    
  59. !   by enclosing it in quotes.
  60. CTBParam 56 Baud ~BAUD Parity None DataBits 8 StopBits 1 Handshake None Port "Modem Port" HoldConnection False RemindDisconnect False
  61. !
  62. !  -Open the selected tool and set a condition if the CTB connection fails
  63. CTBOpen 1
  64. Alert 90 An attempt to open the CTB connection failed. The parameters may be set wrong. Click OK to set the parameters manually, or Cancel to cancel.
  65. CTBChoose
  66. CTBOpen 1
  67. Jump 57
  68. !
  69. -LABEL 1
  70. DsplyMsg Checking modem type…
  71. ChrDelay 2
  72. MatchStr 1 20 Apple Data Modem
  73. MatchStr 2 2 ERROR
  74. Xmit ATI9\13
  75. Wait 30
  76. !
  77. -LABEL 2
  78. DsplyMsg Configuring the modem…
  79. MatchStr 1 44 NO CARRIER
  80. MatchStr 2 5 OK
  81. MatchStr 3 3 ERROR
  82. Flush
  83. ChrDelay 5
  84. Xmit ~MSTR\13
  85. Wait 120
  86. CTBDown 58
  87. !
  88. -LABEL 3
  89. DsplyMsg Not accepting the Modem String (from Set Up)
  90. JSR 100
  91. MatchStr 2 5 OK
  92. MatchStr 3 4 ERROR
  93. Xmit ATE0X1V1\13
  94. DsplyMsg Trying ATE0X1V1…
  95. Wait 120
  96. !
  97. -LABEL 4
  98. DsplyMsg Still no luck.  Trying factory defaults.
  99. Pause 60
  100. MatchStr 2 5 OK
  101. MatchStr 3 41 ERROR
  102. Xmit AT&F\13
  103. Wait 120
  104. Jump 40
  105. !
  106. -LABEL 5
  107. DsplyPic 1
  108. DsplyMsg Dialing ~FONE…
  109. MatchStr 2 30 CONNECT
  110. MatchStr 3 10 BUSY
  111. MatchStr 4 43 NO DIALTONE
  112. MatchStr 5 6 RINGING
  113. Pause 30
  114. CanBtn 90
  115. Xmit ATD~TONE~FONE\13
  116. Wait 600
  117. CTBDown 58
  118. DsplyMsg Waiting for connection…
  119. Wait 2000
  120. IncVar 1
  121. IfVar 1 3 61
  122. DsplyMsg No answer.  Trying again…
  123. JSR 100
  124. Pause 30
  125. Flush
  126. Jump 5
  127. !
  128. -LABEL 6
  129. DsplyMsg >RING<…
  130. MatchStr 5 7 RINGING
  131. Wait 120
  132. DsplyMsg Waiting for answer…
  133. Wait 2000
  134. IncVar 1
  135. IfVar 1 3 61
  136. DsplyMsg No answer.  Trying again…
  137. JSR 100
  138. Pause 30
  139. Flush
  140. Jump 5
  141. !
  142. -LABEL 7
  143. DsplyMsg >RING<  >RING<…
  144. MatchStr 5 8 RINGING
  145. Wait 120
  146. DsplyMsg Still waiting for answer…
  147. Wait 600
  148. IncVar 1
  149. IfVar 1 3 61
  150. DsplyMsg No answer.  Trying again…
  151. JSR 100
  152. Pause 30
  153. Flush
  154. Jump 5
  155. !
  156. -LABEL 8
  157. DsplyMsg >RING<  >RING<  >RING<…
  158. MatchStr 5 9 RINGING
  159. Wait 120
  160. DsplyMsg Getting tired of waiting…
  161. Wait 400
  162. IncVar 1
  163. IfVar 1 3 61
  164. DsplyMsg No answer. Trying again…
  165. JSR 100
  166. Pause 30
  167. Flush
  168. Jump 5
  169. !
  170. -LABEL 9
  171. DsplyMsg >RING<  >RING<  >RING<  >RING<…
  172. Wait 120
  173. DsplyMsg Still waiting…
  174. Wait 1400
  175. IncVar 1
  176. IfVar 1 3 61
  177. DsplyMsg No answer. Trying again…
  178. JSR 100
  179. Pause 30
  180. Flush
  181. Jump 5
  182. !
  183. -LABEL 10
  184. IncVar 2
  185. IfVar 2 4 60
  186. IfEqJmp "~FON2" "-------------" 15
  187. IFEqJmp "~FON2" "" 15
  188. DsplyMsg The network modem is busy; trying alternate number…
  189. JSR 100
  190. Pause 30
  191. Flush
  192. !
  193. -LABEL 11
  194. DsplyMsg Dialing ~FON2…
  195. MatchStr 2 30 CONNECT
  196. MatchStr 3 12 BUSY
  197. MatchStr 4 43 NO DIALTONE
  198. MatchStr 5 6 RINGING
  199. Pause 30
  200. CanBtn 90
  201. SerReset ~BPS2 0 8 1
  202. Xmit ATD~TONE~FON2\13
  203. Wait 600
  204. CTBDown 58
  205. DsplyMsg Waiting for connection…
  206. Wait 2000
  207. IncVar 1
  208. IfVar 1 3 61
  209. DsplyMsg No answer.  Trying again…
  210. JSR 100
  211. Pause 30
  212. Flush
  213. Jump 11
  214. !
  215. -LABEL 12
  216. IncVar 2
  217. IfVar 2 4 64
  218. DsplyMsg The alternate phone number is busy; trying first number…
  219. JSR 100
  220. Pause 30
  221. Flush
  222. Jump 5
  223. !
  224. -LABEL 15
  225. DsplyMsg The network phone number is busy; trying again…
  226. JSR 100
  227. Pause 30
  228. Flush
  229. Jump 5
  230. !
  231. -LABEL 20
  232. DsplyMsg Configuring Apple Data Modem…
  233. MatchStr 1 44 NO CARRIER
  234. MatchStr 2 5 OK
  235. MatchStr 3 23 ERROR
  236. Xmit ATE0V1X4\92N0\13
  237. Wait 120
  238. !
  239. -LABEL 23
  240. DsplyMsg Apple Data Modem not accepting string: ATE0V1X4\N0
  241. JSR 100
  242. MatchStr 2 5 OK
  243. MatchStr 3 24 ERROR
  244. Xmit ATE0V1X4\92N0\13
  245. DsplyMsg Trying again…
  246. Wait 120
  247. !
  248. -LABEL 24
  249. DsplyMsg Still no luck.  Trying factory defaults.
  250. Pause 60
  251. MatchStr 2 25 OK
  252. MatchStr 3 45 ERROR
  253. Xmit AT&F\13
  254. Wait 120
  255. Jump 40
  256. !
  257. -LABEL 25
  258. MatchStr 2 5 OK
  259. MatchStr 3 46 ERROR
  260. Xmit ATE0V1X4\92N0\13
  261. Wait 120
  262. Jump 41
  263. !
  264. -LABEL 26
  265. IncTries
  266. IfTries 2 73
  267. IfEqJmp "~FON2" "-------------" 73
  268. IFEqJmp "~FON2" "" 73
  269. DsplyMsg The network phone number is down.  Trying alternate…
  270. JSR 100
  271. Pause 30
  272. Flush
  273. Jump 11
  274. !
  275. -LABEL 30
  276. DsplyMsg Connection established. 
  277. Exit 0
  278. !
  279. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  280. !•••         LABELS 40 to 49 are modem errors. Change these freely.         •••
  281. !•••         If you are using this CCL file as a starter CCL, this is       •••
  282. !•••         where you should put alerts for your phone system’s errors.    •••
  283. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  284. -LABEL 40
  285. Alert 91 The modem isn’t responding to AT commands. Turn your modem off, check the cables, the modem set up, the bps rate and port selected in the AppleLink Set Up box, then turn the modem back on again.\13\13Click OK to try again.
  286. Jump 93
  287. !
  288. -LABEL 41
  289. Alert 91 The modem is responding with ERROR to the following AT strings: ~MSTR, ATE0X1V1, and AT&F.\13Please read your modem manual to determine the problem.\13\13Click Cancel or OK to exit.
  290. Jump 91
  291. !
  292. -LABEL 42
  293. Alert 91 Your modem is responding to AT&F, but not to either modem configuration string ~MSTR or ATE0X1V1. Please refer to your modem manual or call your modem manufacturer.\13\13Click Cancel or OK to exit.
  294. Jump 91
  295. !
  296. -LABEL 43
  297. JSR 96
  298. Alert 91 There is no dial tone. Be sure that your modem is connected to a working telephone line.\13If the problem continues, call your telecom representative.\13\13Click OK to try again.
  299. Jump 93
  300. !
  301. -LABEL 44
  302. JSR 96
  303. Alert 91 The phone line has unexpectedly gone dead. Please try turning your modem off then back on before trying again. Either your modem or the network modem may be having a problem.\13\13Click OK to try again.
  304. Jump 93
  305. !
  306. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  307. !•••                   LABELS 50 to 59 are set up errors.                   •••
  308. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  309. !
  310. -LABEL 51
  311. Alert 90 There is a space or spaces in the User field (in the Connect dialog under the Network menu.  The space(s) might be before or after the AppleLink ID).\13\13Please tab to that field and retype your AppleLink ID without spaces.
  312. Jump 90
  313. !
  314. -LABEL 52
  315. Alert 90 There is a hyphen or hyphens in the AppleLink ID field (in the Connect dialog under the Network menu).\13\13Please tab to that field and retype your AppleLink ID without the hyphen(s).
  316. Jump 90
  317. !
  318. -LABEL 53
  319. Alert 90 You must enter a network phone number in the “Network Phone #” field in Set Up Connection under the Network menu.\13\13Use the file “Access Numbers” on your AppleLink disk to find the number closest to you.
  320. Jump 90
  321. !
  322. -LABEL 54
  323. Alert 90 The Communications Toolbox ia not installed. You must have it installed properly to use this connection file.\13\13Click OK or Cancel to cancel.
  324. Jump 90
  325. !
  326. -LABEL 55
  327. Alert 90 An attempt to open the CTB connecetion failed during the opening of the ~TOOL. You must have CTB installed properly to use this connection file. Click OK or Cancel to cancel.
  328. Jump 90
  329. !
  330. -LABEL 56
  331. Alert 90 An attempt to open the ~TOOL failed. Make sure the CTB and ~TOOL is properly installed.\13\13Click OK or Cancel to cancel.
  332. Jump 90
  333. !
  334. -LABEL 57
  335. Alert 90 After repeated attempts, the CTB connection failed while accessing\13 the ~TOOL.\13\13Click OK or Cancel to cancel.
  336. Jump 90
  337. !
  338. -LABEL 58
  339. Alert 90 The ~TOOL connection has suddenly dropped.\13\13Click OK to try again.
  340. Jump 100
  341. !
  342. !
  343. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  344. !•••     LABELS 60 to 69 are network node errors. You may change these.     •••
  345. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  346. !
  347. -LABEL 60
  348. JSR 96
  349. Alert 91 The network number is repeatedly busy. Please try again later. \13\13Click OK to try again now.
  350. Jump 93
  351. !
  352. -LABEL 61
  353. JSR 96
  354. Alert 91 The network is not answering. Check to be sure the phone number is correct.\13If the problem continues, call the Apple Online Services HelpLine at (408) 974-3309.\13\13Click OK to try again.
  355. Jump 93
  356. !
  357. -LABEL 62
  358. JSR 95
  359. Alert 91 The ~APPL host is not responding.\13If the problem continues, call the Apple Online Services HelpLine at (408) 974-3309.\13\13Click OK to try again.
  360. Jump 93
  361. !
  362. -LABEL 63
  363. JSR 95
  364. Alert 91 Speed out of synch error (your H’s got lost). Please report this problem to the Apple Online Services HelpLine at (408) 974-3309.\13\13Click OK to try again.
  365. Jump 93
  366. !
  367. -LABEL 64
  368. JSR 96
  369. Alert 91 Both the network number and alternate network number are repeatedly busy. Please try again later. \13\13Click OK to try again now.
  370. Jump 93
  371. !
  372. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  373. !•••        LABELS 70 to 79 are Mark III errors. Do not change these.       •••
  374. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  375. !
  376.  
  377. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  378. !•••      Disconnection logic. It may look complicated; but, well, OK, I    •••
  379. !•••      guess it is just a bit complex. Simplicity was never my forte.    •••
  380. !•••  --- Don’t change this code except for the DsplyMsg in LABEL 96. ---   •••
  381. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  382. !
  383. -LABEL 90
  384. JSR 95
  385. !
  386. -LABEL 91
  387. Exit -1
  388. !
  389. -LABEL 92
  390. JSR 96
  391. Exit -1
  392. !
  393. -LABEL 93
  394. DsplyPic 0
  395. SetVar 1 0
  396. SetVar 2 0
  397. SetVar 3 0
  398. SetVar 4 0
  399. SetVar 5 0
  400. SetTries 0
  401. Flush
  402. Jump 1
  403. !
  404. -LABEL 94
  405. Xmit STOP\13
  406. Jump 90
  407. !
  408. -LABEL 95
  409. DsplyMsg Disconnecting...
  410. Jump 100
  411. !
  412. -LABEL 96
  413. DsplyMsg Resetting the modem...
  414. !
  415. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  416. !•••   That which actually does the hanging up.  You may change this code.  •••
  417. !••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  418. !
  419. -LABEL 100
  420. MatchStr 1 102 OK
  421. MatchStr 2 102 NO CARRIER
  422. SetVar 8 0
  423. ChrDelay 10
  424. !
  425. -LABEL 101
  426. Xmit +++
  427. Pause 80
  428. Xmit ATZ\13
  429. Wait 100
  430. IncVar 8
  431. IfVar 8 2 103
  432. CTBClose
  433. Jump 101
  434. !
  435. -LABEL 102
  436. MatchStr 1 44 NO CARRIER
  437. CTBClose
  438. Return
  439. !
  440. -LABEL 103
  441. Alert 91 Your modem is not hanging up properly. Please turn it off and then back on again before reconnecting to AppleLink.
  442. Exit -1
  443. ###
  444.